package com.pshcp.common.enums;

/**
 * @Description: 有效证件类型
 * @Author: xiaoche
 * @Date: 2022/10/29 12:36
 */
public enum CardTypeEnum {

    NORMAL_ID(1, "居民身份证","IIT1"),

    SOLDIER(2, "中国人民解放军军人证","IIT4"),

    POLICE(3, "中国人民武装警察身份证","IIT13"),

    HK_MACAO(4, "港澳居民来往大陆通行证","IIT11"),

    TAIWAN(5, "台湾居民来往大陆通行证","IIT15"),

    PASSPORT(6, "护照","IITX"),

    DRIVER_LIC(7, "机动车驾驶证","IIT8"),

    FAMILY_ACCOUNT(8, "户口簿","IIT9"),

    HK_MACAO_LIVE(10, "港澳台居民居住证",""),

    FOREIGNER_ID(11, "外国人永久居留身份证","IIT14"),

    OTHER(99, "其他","IITO"),
    ;

    private Integer code;
    private String desc;

    private String hisCode;

    CardTypeEnum(Integer code, String desc,String hisCode) {
        this.code = code;
        this.desc = desc;
        this.hisCode = hisCode;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getHisCode() {
        return hisCode;
    }

    public void setHisCode(String hisCode) {
        this.hisCode = hisCode;
    }

    public static CardTypeEnum getByCode(int code){
        for(CardTypeEnum e : CardTypeEnum.values()){
            if(e.getCode().intValue() == code){
                return e;
            }
        }
        return null;
    }

}
/** his code
 IIT O 其他
 IIT R 出生证明
 IIT X 护照
 IIT 1 身份证
 IIT 2 工作证
 IIT 3 学生证
 IIT 4 军官证/文职证
 IIT 5 暂住证
 IIT 6 低保证
 IIT 7 医保手册
 IIT 8 驾照
 IIT 9 户口本
 IIT 10 士兵证
 IIT 11 港澳居民来往内地通行证
 IIT 12 临时身份证
 IIT 13 警官证
 IIT 14 外国人永久居留证
 IIT 15 台湾居民来往大陆通行证
 IIT 16 社会统一信用代码
 */